package org.esprit.ocm.client.rpc.oca;

import java.util.List;

import org.esprit.ocm.model.oca.ClusterOca;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

@RemoteServiceRelativePath("ClusterOcaService.rpc")
public interface ClusterOcaService extends RemoteService {

	/**
	 * List All Cluster
	 * 
	 * @param client
	 * @return
	 * @throws Exception
	 */
	public List<ClusterOca> listAll(String secret, String endpoint) throws Exception;

	/**
	 * Allocate new Cluster
	 * 
	 * @param client
	 * @param name
	 * @return
	 * @throws Exception
	 */
	public String allocate(String secret, String endpoint, String name) throws Exception;

	/**
	 * Describe Cluster
	 * 
	 * @param client
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public ClusterOca info(String secret, String endpoint, int id) throws Exception;

	/**
	 * Delete a Cluster
	 * 
	 * @param client
	 * @param hostId
	 * @return
	 * @throws Exception
	 */
	public String delete(String secret, String endpoint, int clusterId) throws Exception;

	/**
	 * Add Host to cluster
	 * 
	 * @param client
	 * @param clusterId
	 * @param host
	 * @throws Exception
	 */
	public String addHost(String secret, String endpoint, int clusterId, int hostId) throws Exception;

	/**
	 * Reomve host from Cluster
	 * 
	 * @param client
	 * @param clusterId
	 * @param host
	 * @throws Exception
	 */
	public String removeHost(String secret, String endpoint, int hostId) throws Exception;
}
